<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<!--引入外部文件  -->
<%@include file="/WEB-INF/head.jsp" %>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/purchasebill.js"></script>
</head>
<body>
<!--做添加的框    closed: true 一开始这个框是关闭的状态-->
<div id="editDlg" class="easyui-dialog" title="My Dialog"  style = "padding:10px"
        data-options="iconCls:'icon-save',resizable:true,modal:true,closed: true, shadow:false">
    <form id="addForm" method="post">
    <!--使用隐藏域防止数据丢失  -->
    <input type="hidden" name="id" id = "purchasebillId" />
            <table cellpadding="5">
            	<tr>
	    			<td>交易时间:</td>
	    			<td><input name="vdate" class="easyui-datebox" style="width:150px"></input>
	    			</td>
	    		</tr>
	    		<tr>
	    			<td>总金额:</td>
	    			<td><input class="easyui-validatebox" name="totalAmount" type="text"></input>
	    			</td>
	    		</tr>
	    		<tr>
	    			<td>总个数:</td>
	    			<td><input class="easyui-validatebox" name="totalNum" type="text"></input>
	    			</td>
	    		</tr>
	    		<tr>
	    			<td>审核状态:</td>
	    			<td>
	    				<select class="easyui-combobox" panelHeight="auto" name="status"  style="width:100px;">
			                <option value="">---请选择---</option>
			                <option value="0">待审</option>
			                <option value="1">已审</option>
			                <option value="-1">作废</option>
		                </select>
	    			</td>
	    		</tr>

	    	</table>
        </form>
        <div style="text-align:center;padding:5px 0">
            <a href="javascript:void(0)" class="easyui-linkbutton" data-method="save" style="width:80px">Submit</a>
            <a href="javascript:void(0)" class="easyui-linkbutton" onclick="$('#editDlg').dialog('close')" style="width:80px" >Clear</a>
        </div>
</div>

<div id="tb" style="padding:5px;height:auto">
		<div style="margin-bottom:5px">
			<a href="javascript:;" data-method="add"  class="easyui-linkbutton" iconCls="icon-add" plain="true">添加</a>
			<a href="javascript:;" data-method="edit" class="easyui-linkbutton" iconCls="icon-edit" plain="true">修改</a>
			<a href="javascript:;" data-method="remove" class="easyui-linkbutton" iconCls="icon-remove" plain="true">删除</a>
		</div>
		<form action="#" id="searchForm" method="post">
		<div>
			采购时间:
			<input name="beginDate" class="easyui-datebox" style="width:150px">-
			<input name="endDate" class="easyui-datebox" style="width:150px">
			状态：<select class="easyui-combobox" panelHeight="auto" name="status"  style="width:100px;">
                <option value="">---请选择---</option>
                <option value="0">待审</option>
                <option value="1">已审</option>
                <option value="-1">作废</option>
                </select>
			<a href="javascript:;" data-method="search"  class="easyui-linkbutton" iconCls="icon-search">Search</a>
		</div>
		</form>
	</div>



<!--pagination:true   显示分页的内容  -->
<table id="purchasebillGrid" class="easyui-datagrid" fit="true"
		data-options="
       url:'/purchasebill/page',
       fitColumns:true,
       singleSelect:true,
       pagination:true,
       toolbar:'#tb'
    ">
		<thead>
			<tr>
				<th data-options="field:'vdate',width:100">交易时间</th>
				<th data-options="field:'totalAmount',width:100" >总的金额</th>
				<th data-options="field:'totalNum',width:100,align:'right'">总个数</th>
				<th data-options="field:'inputTime',width:100,align:'right'">录入时间</th>
				<th data-options="field:'status',width:100,align:'right',formatter:statusMatter">状态</th>
			</tr>
		</thead>
	</table>


</body>
</html>
